home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / dev / c / CLib37x.readme < prev    next >
Encoding:
Text File  |  1997-09-05  |  14.9 KB  |  320 lines

  1. Short:    Example.library in 100% C (SAS/Storm/Maxon/GCC/...)
  2. Author:   Andreas R. Kleinert, Helmut Hummel, Stefan Fuchs, Aaron Digulla, Gunther Nikl
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Type:     dev/c
  5.  
  6.  
  7.   example.library V37.16 (23.8.97)
  8.  
  9.   An Amiga shared library in 100 % C language - coming with sources.
  10.  
  11.   Compiler Checklist:        Compiler           Support
  12.                              -------------------------------
  13.    (see README.<compiler>    SAS/C 6.5x         yes
  14.     for more information)    MaxonC 3.x         yes
  15.                              StormC 2.x         yes
  16.                              DICE 3.x           (not tested)
  17.                              GCC 2.7.2.1        yes
  18.                              AztecC             (not tested)
  19.                              vbcc               (in work)
  20.  
  21.   OS Checklist:              Operating Sustem   Support
  22.                              -------------------------------
  23.                              Amiga OS 37-40     yes
  24.                              AROS 1.x           yes (AROS source tree)
  25.  
  26.  
  27.   Original SAS/C and StormC version (C) 1996-97 by Andreas R. Kleinert,
  28.   MaxonC version changes done 1996 by Helmut Hummel.
  29.   GCC version changes done 1997 by Stefan Fuchs and Gunter Nikl.
  30.   AROS source tree done 1997 by Aaron Digulla.
  31.   All rights reserved.
  32.   ----------------------------------------------------------------------
  33.   This sample library intends to make Amiga shared library sources
  34.   compileable with any available Amiga C compiler - without any
  35.   changes to the source code.
  36.   And maybe in the future also running under any Amiga compatible
  37.   operating system with any CPU.
  38.  
  39.   The first goal seams to be easily done: nearly any noticeable compiler
  40.   for the Amiga does support generation of libraries by special
  41.   linker commands and pre-generated object files.
  42.  
  43.   But when looking into the details, one will find out, that these
  44.   linker functionality just reduces the influence of the programmer
  45.   on how his sources are handled, that the pre-generated object
  46.   files just originally were done in Assembler, and that each compiler
  47.   does define its own interface definitions and usage rules.
  48.  
  49.   But as a programmer, it is important to have control over the _complete_
  50.   source code and to be able to compile it _anywhere_ with only
  51.   minor changes, even better without any changes.
  52.  
  53.   Since most Amiga system modules - noticeable Libraries, Devices and
  54.   Resources - do have startup-modules and other larger parts completely
  55.   written in Assembler language, the most important task for getting
  56.   inter-compiler and operating system independant sources in my opinion
  57.   is, to completely migrate the interfaces to C language (but different
  58.   to AROS, for example, it is most important, to keep the sources running
  59.   under the current 68k AmigaOS in the _first_ place).
  60.  
  61.   This goal basically has been reached already, still missing of
  62.   course are some of the less Amiga-native compilers and of course
  63.   tests with any kind of "AmigaOS for PowerPC".
  64.  
  65.   But since Assembler is nearly as portability-hostile as BCPL _today_
  66.   we may come quite close to the goal defined above by just moving
  67.   towards C.
  68.  
  69.   Translate your 68k-assembler library startup-codes smartly
  70.   to C by simply using this source-code as an advice how to do it.
  71.  
  72.   For testing: install the (re)compiled example.library to LIBS: and
  73.   start the test program - it should pop up a requester, then.
  74.  
  75.   If you can submit adjustments for the other compilers as mentioned
  76.   above: feel free to send these.
  77.   ---
  78.   Feel free to use this source for own projects.
  79.  
  80.   It is allowed to be spread and distributed anywhere, as far
  81.   as my consent is concerned.
  82.  
  83.   Amiga International, or the current owner of the technologie,
  84.   is allowed to always put this source on their newest
  85.   Developer CD-ROM.
  86.  
  87.   Thanks and credits will always be appreciated - for example,
  88.   you MAY, but NEED NOT:
  89.   give me credits in your program's docs, send me keyfiles for
  90.   your programs using the library, and so on.
  91.   But that's simply voluntarily.
  92.  
  93.    _________________________________________________________
  94.   |      You may reach me the following way.                |
  95.   |    Send bug-reports, money or whatever to:              |
  96.   |---------------------------------------------------------|
  97.   |        * SuperView Development & Registration *         |
  98.   |          * DRAFU Development & Registration *           |
  99.   |       * Image Engineer Registration Site Europe *       |
  100.   |                                                         |
  101.   |                                                         |
  102.   |                  PerSuaSiVe SoftWorX                    |
  103.   |                                                         |
  104.   |                  Andreas R. Kleinert                    |
  105.   |                  Sandstrasse 1                          |
  106.   |                  D-57072 Siegen                         |
  107.   |                  Germany, Europe                        |
  108.   |                                                         |
  109.   | Any snail mail to the old address will still be routed. |
  110.   |                                                         |
  111.   |                  Phone:  +49-271-22869 also FAX + AM    |
  112.   |                          +49-271-22838                  |
  113.   |                                                         |
  114.   |                  Weekdays after 17.00h.                 |
  115.   |                                                         |
  116.   |         When calling via phone you may leave a message, |
  117.   |         if I'm not available - but don't expect me      |
  118.   |         calling back to USA, Australia, ... since       |
  119.   |         german phone rates are HIGHLY expensive.        |
  120.   |_________________________________________________________|
  121.  
  122.     http://home.t-online.de/home/Andreas_Kleinert/
  123.  
  124.   eMail:
  125.  
  126.         Please send binaries via ARK@COB.wwbnet.de, and keep
  127.         them smaller than 16 KB. Please think twice before
  128.         sending them - my postbox is not unlimited in size.
  129.  
  130.            - Fido    Andreas Kleinert 2:2457/350.18
  131.            - Usenet
  132.                      Andreas_Kleinert@superview.ftn.neckar-alb.de (Fido-Gate)
  133.                      Andreas_Kleinert@t-online.de                 (T-Online)
  134.                      ARK@COB.wwbnet.de                            (Z-Netz)
  135.                      ARK@amigaworld.com                           (AmigaWorld)
  136.  
  137.            - If nothing else works, try one of these public
  138.              Fido-Usenet gateways:
  139.  
  140.                In Germany:
  141.                  Andreas_Kleinert@p18.f350.n2457.z2.fido.sub.org
  142.  
  143.                From USA or elsewhere:
  144.                  Andreas_Kleinert@p18.f350.n2457.z2.fidonet.org
  145.  
  146.  
  147.  Known Bugs:        - some versions of DOpus and all Installer versions
  148.                       can't fetch the version information from the
  149.                       library binary due to some bugs in their code.
  150.                       Newer DOpus versions have this fixed and C:Version
  151.                       for example did that task always.
  152.  
  153.  
  154.  History:
  155.  
  156.  V37.16 (23.8.97) : - V37.15 - frozen AROS spin-off
  157.                     - AROS-Version now included with AROS package, separately
  158.                     - added comments about Forbid/Permit/Wait/single-threading
  159.                       to the Library access functions
  160.                     - also commented the rest a little bit
  161.                       (-> maybe some certain people from comp.sys.amiga.programmer
  162.                           now feel better - but then again... maybe not ;)
  163.  
  164.  V37.14 (13.8.97) : - AROS: - the LH1_ to LH2_ macro replacements in
  165.                               "compiler.h" had been wrongly defined
  166.                             - "BPTR" type only was available under AROS,
  167.                               now using "struct SegList *"
  168.                             - AROS version now does compile under AmigaOS
  169.                               with SAS/C 6.58, too
  170.                     - "APTR seglist" now "struct SegList *"
  171.  
  172.  V37.13 (19.7.97) : - GNU makefile had lost its TABs
  173.                       (-> Gunter Nikl)
  174.  
  175.  V37.12 (29.6.97) : - fixed memory bug-fix (argh)
  176.                       (-> Gunter Nikl)
  177.                     - changed/applied GCC adjustments
  178.                       (-> diffs by Gunter Nikl)
  179.  
  180.  V37.11 (24.6.97) : - added "known bugs" section
  181.                     - LibInit now delocates library base on error
  182.                       (NULL return)
  183.                       (-> Gunter Nikl)
  184.                     - added AROS version, and created an additional
  185.                       source tree for it, since I did not get it compiled
  186.                       with SAS/C 6.57 and there's perhaps additional
  187.                       #ifdef stuf to be done. Anyone likes to merge these ?
  188.                       (-> Aaron Digulla)
  189.  
  190.  V37.10 (6.4.97) :  - added GCC version by Stefan Fuchs, snfuchs@sokrates.franken.de.
  191.                       Thanks !
  192.                     - some small changes to docs, includes and comments
  193.                     - still missing: DICE, Aztec, vbcc. Who does it ?
  194.                     - fixed ftn email address
  195.  
  196.  V37.6 (27.3.97) :  - finetuning
  197.  
  198.  V37.5 (24.1.97) :  - rewrote docs
  199.                     - added basic support for compiler independent
  200.                       register naming and SAS/C keyword replacements
  201.                       (compiler.h). Thus sources now should be easily
  202.                       adaptable for GCC as well.
  203.  
  204.  V37.4 (8.1.97) :   - added FD file
  205.                     - added new pragma file (and dir) as
  206.                       include/pragma/example_lib.h
  207.                       which works with Aztec, Maxon, Storm,
  208.                       DICE and SAS C compilers.
  209.                       Thanks to fd2pragma and Dirk Stoecker.
  210.                     - some fixes to the readme files
  211.                     - updated eMail list
  212.  
  213.  V37.3 (3.1.97) :   - slightly changed SCOPTIONS
  214.                     - fixed some style things (APTR and library casts)
  215.                     - changed note about library opening at L_OpenLibs()
  216.                     - now compileable with StormC 2.0 as well
  217.                       (not tested with 1.1) - see readme file for StormC
  218.                     - added project file for StormC 2.0, smakefile still
  219.                       present - select, which one you'd like to use
  220.  
  221.  V37.2 (12.12.96) : - applied some more changes and fixes
  222.                       (-> suggested by Helmut Hummel)
  223.                     - added icons
  224.                       (-> from Helmut Hummel)
  225.  
  226.  V37.1 (4.12.96) : - bumped version to V37
  227.                    - added MaxonC 3.x version by applying changes
  228.                      to the SAS/C sources and adding Maxon
  229.                      specific make and configuration files
  230.                      (-> all done by Helmut Hummel, see Readme.MAXON)
  231.                    - added StormC support
  232.                    - yet missing: DICE, Aztec, GNU. Who does it ?
  233.  
  234.  V1.4 (30.11.96) : - added SAS/C specific Ctrl-C disabling code
  235.                    - made some workarounds compiler sensitive
  236.                    - redone all with SAS/C V6.57
  237.                    - 944 Bytes ;-)
  238.  
  239.  V1.3 (13.9.96) :  - when starting lib as executable, -1 must be returned
  240.                    - now caching SysBase
  241.                    - added some comments, where changes should not
  242.                      be applied
  243.                    - added note about sharing library bases
  244.                    - documented and modified sample function,
  245.                      so that correct a0/a1/d0/d1 and a6 usage becomes
  246.                      more obviously and verbose
  247.                    - still 940 bytes ;-)
  248.  
  249.  V1.2 (5.9.96)  :  - fixed some things resulting out of a
  250.                      discussion in Z-Netz
  251.  
  252.  V1.1 (1.9.96)  :  - small changes in style
  253.                      (only bumped versions of changed modules):
  254.                        o moved "examplebase.h" to include/example/
  255.                          (so also adjusted LibInit.c, StartUp.c
  256.                           and SCOPTIONS for reflecting that)
  257.                        o SampleFuncs.h did contain wrong prototype
  258.                          (did not matter, since only used for
  259.                           ULONG function table within StartUp.c)
  260.                        o explicitely __aligned ROMTag structure
  261.  
  262.  V1.0 (14.8.96) : - first release
  263.  
  264.  
  265.  ---
  266.  All mentioned trademarks are subject to their owners.
  267.  
  268.  
  269. ============================= Archive contents =============================
  270.  
  271. Original  Packed Ratio    Date     Time    Name
  272. -------- ------- ----- --------- --------  -------------
  273.     1720     433 74.8% 11-Dec-96 15:39:54 +bin.info
  274.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  275.      450     230 48.8% 11-Dec-96 15:49:34 +TestExampleLib.info
  276.      888     602 32.2% 22-Aug-97 09:45:58 +example.library
  277.     2101    1066 49.2% 23-Aug-97 11:40:22 +ReadMe.AROS
  278.     1884     861 54.2% 01-Apr-97 11:27:18 +ReadMe.GCC
  279.     1201     683 43.1% 25-Jan-97 10:21:22 +ReadMe.MAXON
  280.      486     280 42.3% 27-Mar-97 10:33:08 +ReadMe.SAS
  281.      915     480 47.5% 25-Jan-97 10:21:12 +ReadMe.STORM
  282.    12176    4362 64.1% 22-Aug-97 09:47:08 +ReadMe_First
  283.     1720     433 74.8% 11-Dec-96 15:39:56 +source.info
  284.      125     117  6.4% 08-Jan-97 19:09:50 +example.fd
  285.      425     247 41.8% 05-Dec-96 11:45:24 +example_protos.h
  286.      289     185 35.9% 05-Dec-96 11:44:58 +example.h
  287.      654     319 51.2% 11-Dec-96 15:00:22 +examplebase.h
  288.      477     247 48.2% 08-Jan-97 19:10:26 +example_lib.h
  289.      311     207 33.4% 05-Dec-96 11:45:38 +example_pragmas.h
  290.      330     207 37.2% 05-Dec-96 11:45:50 +example.h
  291.     1720     433 74.8% 11-Dec-96 15:39:42 +lib_source.info
  292.     3809    1234 67.6% 29-Jun-97 20:30:28 +compiler.h
  293.      888     602 32.2% 22-Aug-97 09:45:56 +example.library
  294.     5095    1820 64.2% 22-Aug-97 09:45:46 +LibInit.c
  295.      888     544 38.7% 22-Aug-97 09:45:56 +LibInit.o
  296.       25      25  0.0% 05-Dec-96 12:07:46 +make_storm.bat
  297.      427     223 47.7% 19-Jul-97 14:07:00 +makefile.gcc
  298.      419     164 60.8% 11-Dec-96 15:31:14 +makefile.MAXON
  299.      347     232 33.1% 05-Dec-96 11:36:28 +makefile.MAXON.info
  300.      381     232 39.1% 05-Dec-96 11:36:28 +mcpp.SESSION
  301.     1591     824 48.2% 29-Jun-97 20:20:48 +SampleFuncs.c
  302.      370     248 32.9% 29-Jun-97 20:20:40 +SampleFuncs.h
  303.      216     194 10.1% 29-Jun-97 20:30:08 +SampleFuncs.o
  304.      128     105 17.9% 03-Jan-97 15:29:36 +SCOPTIONS
  305.      395     148 62.5% 05-Dec-96 11:36:28 +smakefile
  306.       95      85 10.5% 05-Dec-96 11:36:28 +smakefile.wth
  307.     9689    2399 75.2% 22-Aug-97 09:30:48 +StartUp.c
  308.      824     509 38.2% 22-Aug-97 09:30:56 +StartUp.o
  309.     1757     595 66.1% 03-Jan-97 15:44:56 +storm_project.¶
  310.      624     350 43.9% 03-Jan-97 15:44:56 +storm_project.¶.info
  311.      622     269 56.7% 03-Jan-97 15:44:30 +storm_smakefile
  312.      119     100 15.9% 05-Dec-96 11:36:28 +SCOPTIONS
  313.      256     105 58.9% 05-Dec-96 11:36:28 +smakefile
  314.     5248    3480 33.6% 05-Dec-96 11:46:22 +TestExampleLib
  315.      673     374 44.4% 05-Dec-96 11:46:12 +TestExampleLib.c
  316.      835     394 52.8% 05-Dec-96 11:36:28 +TestExampleLib.info
  317.      300     242 19.3% 05-Dec-96 11:46:20 +TestExampleLib.o
  318. -------- ------- ----- --------- --------
  319.    69141   30369 56.0% 23-Aug-97 23:58:44   45 files
  320.